const Request = (conf, param) => {
	const config = {
		url: '',
		data: param || {},
		method: 'POST',
		timeout: 3000,
		dataType: 'josn'
	}
	const promise = new Promise((resolve, reject) => {
		let result = {
			success: (res) => {
				resolve(JSON.parse(res.data).data)
			},
			fail: (err) => {
				reject(err)
			}
		}
		Object.assign(config, conf, result)
		uni.request(config)
	})
	return promise
}

export default Request